using MyHomeworkWebAPi.Models;
using MyHomeworkWebAPi.Models.ef;
using MyHomeworkWebAPi.Models.Request;

namespace MyHomeworkWebAPi.Services
{
    public interface IUserServices
    {
        // 认证相关方法
        Task<string> LoginAsync(LoginModel model);

        // 用户管理方法
        Task<List<Models.ef.User>> GetAllAsync();
        Task<Models.ef.User?> GetByIdAsync(Guid userId);
        Task<bool> IsStudentIdExistsAsync(string studentId);
        Task<bool> IsNicknameExistsAsync(string nickname);
        Task<bool> IsPhoneExistsAsync(string phone);
        Task<Models.ef.User> RegisterAsync(UserRegisterRequest request);
        Task<Models.ef.User> UpdateNicknameAsync(Guid userId, string newNickname);
        Task<Models.ef.User> UpdatePhoneAsync(Guid userId, string newPhone);
        Task<Models.ef.User> UpdatePasswordAsync(Guid userId, string oldPassword, string newPassword);
        Task<Models.ef.User> UpdateAvatarAsync(Guid userId, string newAvatar);
        Task<bool> DeleteAsync(Guid userId);
    }
}